home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / System / BoingBag1 / Nicer / Install Script next >
Text File  |  1999-12-22  |  9KB  |  310 lines

  1.  
  2. (set #language (getenv "Language"))
  3.  
  4. ; English strings
  5. (set #docu-welcome "Install AmigaOS 3.5 documentation on your harddisk.")
  6. (set #docu-which-dir 
  7.     (cat
  8.         "In which drawer should the documentation be installed?\n"
  9.         "A new drawer is created for each language."
  10.     )
  11. )
  12. (set #docu-which-dir-help
  13.     (cat
  14.         "\nChoose a drawer where the OS 3.5 documentation should "
  15.         "be installed. The documentation is copied from your "
  16.         "AmigaOS 3.5 CD ROM and automatically reformatted."
  17.         "\nEach language automatically gets its own drawer within the drawer "
  18.         "you choose.\n\n"
  19.         @askdir-help
  20.     )
  21. )
  22. (set #docu-which-languages "Select the languages to install")
  23. (set #docu-which-languages-help @askoptions-help)
  24. (set #docu-languages-default 1)
  25. (set #docu-which-browser "Select a browser to use for documentation reading")
  26. (set #docu-which-browser-help
  27.     (cat
  28.         "\nSelect the browser you want to use to read the "
  29.         "AmigaOS 3.5 documentation. The file you select is "
  30.         "used as the default tool for the documentation icon.\n\n"
  31.         @askfile-help
  32.     )
  33. )
  34. (set #docu-which-browser-default "Sys:Internet/AWeb3SE/AWeb-II")
  35. (set #docu-run-nicer-fmt "Modifing %s manual. Please wait...")
  36. (set #docu-drawer "AmigaOS 3.5 Manual")
  37.  
  38. (complete 0)
  39.  
  40. ; ****************************
  41.  
  42. (if (= #language "deutsch")
  43. (
  44. (set #docu-welcome "AmigaOS 3.5 Installation der Dokumentation.")
  45. (set #docu-which-dir 
  46.     (cat
  47.         "In welche Schublade installieren?\n"
  48.         "Für jede Sprache wird eine eigene erzeugt."
  49.     )
  50. )
  51. (set #docu-which-dir-help
  52.     (cat
  53.         "\nWählen Sie eine Schublade aus, in der die OS 3.5 "
  54.         "Dokumentation installiert werden soll. Die Dokumentation "
  55.         "wird von Ihrer AmigaOS 3.5 CD ROM kopiert und automatisch "
  56.         "neu formatiert."
  57.         "\nFür jede Sprache, die Sie installieren wird eine eigene "
  58.         "Schublade in der von Ihnen ausgewählten Schublade erzeugt. "
  59.         "Obwohl als Vorschlag SYS: angegeben wird, sollten Sie eine "
  60.         "andere Festplatte auswählen, wenn Sie nicht noch wenigstens "
  61.         "10 MB Platz auf Ihrer Systemplatte frei haben.\n\n"
  62.         @askdir-help
  63.     )
  64. )
  65. (set #docu-which-languages "Wählen Sie die Sprache(n)")
  66. (set #docu-which-languages-help @askoptions-help)
  67. (set #docu-languages-default 2)
  68. (set #docu-which-browser "Wählen Sie Ihren Browser aus")
  69. (set #docu-which-browser-help
  70.     (cat
  71.         "\nWählen Sie den Browser, den Sie zum Lesen der AmigaOS 3.5 "
  72.         "Dokumentation benutzen wollen. Das Programm, daß Sie "
  73.         "auswöhlen wird als Standardprogramm im Piktogramm "
  74.         "eingetragen.\n\n"
  75.         @askfile-help
  76.     )
  77. )
  78. (set #docu-run-nicer-fmt "Formatiere %s Anleitung. Bitte warten...")
  79. (set #docu-drawer "AmigaOS 3.5 Anleitung")
  80. ))
  81.  
  82. ; ****************************
  83.  
  84. (procedure @initcomplete _start _full _steps
  85.     (set complete_start _start)
  86.     (set complete_step (/ _full _steps))
  87.     (complete _start)
  88. )
  89.  
  90. (procedure @completer step
  91.     (complete (+ complete_start (* complete_step step)))
  92. )
  93.  
  94. ; ****************************
  95.  
  96. (procedure @copydocu _start _step
  97.     (@initcomplete _start _step 2)
  98.     (if (IN docu-languages 0)
  99.         (
  100.             (set ct (tackon docu-target "AmigaOS 3.5 Manual"))
  101.             (copyfiles
  102.                 (source "AmigaOS3.5:OS-Version3.5/AmigaOS 3.5 Manual")
  103.                 (dest ct)
  104.                 (all)
  105.                 (infos)
  106.                 (optional nofail force askuser)
  107.             )
  108.             (copyfiles
  109.                 (source "AmigaOS 3.5 Manual")
  110.                 (dest ct)
  111.                 (all)
  112.                 (infos)
  113.                 (optional nofail force askuser)
  114.             )
  115.         )
  116.     )
  117.     (@completer 1)
  118.     (if (IN docu-languages 1)
  119.         (
  120.             (set ct (tackon docu-target "AmigaOS 3.5 Anleitung"))
  121.             (copyfiles
  122.                 (source "AmigaOS3.5:OS-Version3.5/AmigaOS 3.5 Anleitung")
  123.                 (dest ct)
  124.                 (all)
  125.                 (infos)
  126.                 (optional nofail force askuser)
  127.             )
  128.             (copyfiles
  129.                 (source "AmigaOS 3.5 Anleitung")
  130.                 (dest ct)
  131.                 (all)
  132.                 (infos)
  133.                 (optional nofail force askuser)
  134.             )
  135.         )
  136.     )
  137.     (@completer 2)
  138. )
  139.  
  140. (procedure @patchdocu _start _step
  141. )
  142.  
  143. (procedure @donicer _lang _dir _name _args
  144.     (set ct (tackon docu-target _lang))
  145.     (set ct (tackon ct _dir))
  146.     (rename (tackon ct "book-main.html") (tackon ct "book-main-old.html"))
  147.     (set cmd
  148.         (cat 
  149.             "NicerDocu >>t:log FROM \"" 
  150.             (tackon ct "book-main-old.html")
  151.             "\" TO \""
  152.             (tackon ct "book-main")
  153.             "\" "
  154.             _args
  155.         )
  156.     )
  157.     (working (#docu-run-nicer-fmt _name))
  158.     (run cmd)
  159.     (delete (tackon ct "book-main-old.html"))
  160. )
  161.  
  162. (procedure @doindex _lang _dir _name
  163.     (set ct (tackon docu-target _lang))
  164.     (set ct (tackon ct _dir))
  165.     (rename (tackon ct "book-index.html") (tackon ct "book-index-old.html"))
  166.     (set cmd
  167.         (cat
  168.             "NicerDocu FROM \""
  169.             (tackon ct "book-index-old.html")
  170.             "\" TO \""
  171.             (tackon ct "book-index.html")
  172.             "\" CHANGEINDEX"
  173.         )
  174.     )
  175.     (working (#docu-run-nicer-fmt _name))
  176.     (run cmd)
  177.     (delete (tackon ct "book-index-old.html"))
  178. )
  179.  
  180. (procedure @dotoc _lang _dir _name
  181.     (set ct (tackon docu-target _lang))
  182.     (set ct (tackon ct _dir))
  183.     (rename (tackon ct "book-toc.html") (tackon ct "book-toc-old.html"))
  184.     (set cmd
  185.         (cat
  186.             "NicerDocu FROM \""
  187.             (tackon ct "book-toc-old.html")
  188.             "\" TO \""
  189.             (tackon ct "book-toc.html")
  190.             "\" CHANGEINDEX"
  191.         )
  192.     )
  193.     (working (#docu-run-nicer-fmt _name))
  194.     (run cmd)
  195.     (delete (tackon ct "book-toc-old.html"))
  196. )
  197.  
  198. (procedure @donicerdocu _start _step
  199.     (@initcomplete _start _step 10)
  200.     (if (IN docu-languages 0)
  201.         (
  202.             (set buttons "CUT H2 PT=\"Previous\" ST=\"Next\" CT=\"Chapter\" TT=\"Top\"")
  203.             (@donicer "AmigaOS 3.5 Manual" "arexx" "ARexx" buttons)
  204.             (@doindex "AmigaOS 3.5 Manual" "arexx" "ARexx Index")
  205.             (@dotoc "AmigaOS 3.5 Manual" "arexx" "ARexx Contents")
  206.             (@completer 1)
  207.             (@donicer "AmigaOS 3.5 Manual" "dos" "DOS" buttons)
  208.             (@doindex "AmigaOS 3.5 Manual" "dos" "DOS Index")
  209.             (@dotoc "AmigaOS 3.5 Manual" "dos" "DOS Contents")
  210.             (@completer 2)
  211.             (@donicer "AmigaOS 3.5 Manual" "harddisk" "Harddisk" buttons)
  212.             (@doindex "AmigaOS 3.5 Manual" "harddisk" "Harddisk Index")
  213.             (@dotoc "AmigaOS 3.5 Manual" "harddisk" "Harddisk Contents")
  214.             (@completer 3)
  215.             (@donicer "AmigaOS 3.5 Manual" "installation" "Installation" buttons)
  216.             (@doindex "AmigaOS 3.5 Manual" "installation" "Installation Index")
  217.             (@dotoc "AmigaOS 3.5 Manual" "installation" "Installation Contents")
  218.             (@completer 4)
  219.             (@donicer "AmigaOS 3.5 Manual" "workbench" "Workbench" buttons)
  220.             (@doindex "AmigaOS 3.5 Manual" "workbench" "Workbench Index")
  221.             (@dotoc "AmigaOS 3.5 Manual" "workbench" "Workbench Contents")
  222.             (@completer 5)
  223.             (tooltype 
  224.                 (dest (tackon docu-target "AmigaOS 3.5 Manual/index.html"))
  225.                 (setdefaulttool docu-browser)
  226.             )
  227.         )
  228.     )
  229.     (if (IN docu-languages 1)
  230.         (
  231.             (set buttons "CUT H2 PT=\"Zurück\" ST=\"Weiter\" CT=\"Kapitel\" TT=\"Hoch\"")
  232.             (@donicer "AmigaOS 3.5 Anleitung" "arexx" "ARexx" buttons)
  233.             (@doindex "AmigaOS 3.5 Anleitung" "arexx" "ARexx Index")
  234.             (@dotoc "AmigaOS 3.5 Anleitung" "arexx" "ARexx Inhalt")
  235.             (@completer 6)
  236.             (@donicer "AmigaOS 3.5 Anleitung" "dos" "DOS" buttons)
  237.             (@doindex "AmigaOS 3.5 Anleitung" "dos" "DOS Index")
  238.             (@dotoc "AmigaOS 3.5 Anleitung" "dos" "DOS Context")
  239.             (@completer 7)
  240.             (@donicer "AmigaOS 3.5 Anleitung" "harddisk" "Festplatten" buttons)
  241.             (@doindex "AmigaOS 3.5 Anleitung" "harddisk" "Festplatten Index")
  242.             (@dotoc "AmigaOS 3.5 Anleitung" "harddisk" "Festplatten Inhalt")
  243.             (@completer 8)
  244.             (@donicer "AmigaOS 3.5 Anleitung" "installation" "Installation" buttons)
  245.             (@doindex "AmigaOS 3.5 Anleitung" "installation" "Installation Index")
  246.             (@dotoc "AmigaOS 3.5 Anleitung" "installation" "Installation Inhalt")
  247.             (@completer 9)
  248.             (@donicer "AmigaOS 3.5 Anleitung" "workbench" "Workbench" buttons)
  249.             (@doindex "AmigaOS 3.5 Anleitung" "workbench" "Workbench Index")
  250.             (@dotoc "AmigaOS 3.5 Anleitung" "workbench" "Workbench Inhalt")
  251.             (@completer 10)
  252.             (tooltype 
  253.                 (dest (tackon docu-target "AmigaOS 3.5 Anleitung/index.html"))
  254.                 (setdefaulttool docu-browser)
  255.             )
  256.         )
  257.     )
  258. )
  259.  
  260. ; ****************************
  261.  
  262. (trace)
  263. (message #docu-welcome (all))
  264.  
  265. (trace)
  266. (set docu-target 
  267.     (askdir 
  268.         (prompt #docu-which-dir)
  269.         (help #docu-which-dir-help)
  270.         (default @default-dest)
  271.         (back (retrace))
  272.     )
  273. )
  274. (set @default-dest docu-target)
  275. (trace)
  276. (set docu-languages
  277.     (askoptions
  278.         (prompt #docu-which-languages)
  279.         (help #docu-which-languages-help)
  280.         (choices "English" "Deutsch")
  281.         (default #docu-languages-default)
  282.         (back (retrace))
  283.     )
  284. )
  285. (trace)
  286. (set docu-browser
  287.     (askfile
  288.         (prompt #docu-which-browser)
  289.         (help #docu-which-browser-help)
  290.         (default #docu-which-browser-default)
  291.         (back (retrace))
  292.     )
  293. )
  294.  
  295. (@copydocu 10 20)
  296.  
  297. (@patchdocu 30 20)
  298.  
  299. (@donicerdocu 50 50)
  300.  
  301. (complete 100)
  302.  
  303. (if (BITAND docu-languages #docu-languages-default)
  304.     (
  305.         (set wbobj (tackon docu-target #docu-drawer))
  306.         (openwbobject wbobj)
  307.         (showwbobject (tackon wbobj "index.html"))
  308.     )
  309. )
  310.